home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 05.zip
/
BS1 part 5
/
BaudBandit.adf
/
REXX
/
UnArc.baud
< prev
next >
Wrap
Text File
|
1989-07-14
|
930b
|
39 lines
/* UnArc.baud
Place in a function key as '\mUnArc'
and run after downloading arc/zoo/zip files
*/
OPTIONS RESULTS
STATUS Name /* Get the filename */
filename = RESULT
if filename = '' then do /* No file ? */
GETFILE 'File to Extract' /* Ask for a file */
if RESULT = '' then exit /* Did user hit Cancel? */
STATUS Name /* Get the filename again */
filename = RESULT
end
STATUS DataDirectory /* Get the current directory */
dir = RESULT
parse UPPER var filename name'.'ext /* ext is extension (ARC/ZOO/ZIP) */
/* Determine command to use by extension.
The '<*' redirects input to the terminal.
*/
if left(ext,2) = 'ZO' then arcmd = 'Zoo <* x'
else if left(ext,2) = 'AR' then arcmd = 'Arc <* x'
else if left(ext,2) = 'ZI' then arcmd = 'UnZip'
else exit /* unknown extension */
/* Create and execute the command (CD dir\n Arc x filename) */
address command 'CD' dir || '0A'x arcmd filename